package edu.sctu.practice.class02.lvchang.assign06.test2;

import java.awt.*;

/**
 * Created by socul on 2015/12/10.
 */
public class Mycanvas extends Canvas {
    int r;
    Color c;

    public void setColor(Color c) {
        this.c = c;
    }

    public void setR(int r) {
        this.r = r;
    }

    public void paint(Graphics g) {
        g.setColor(c);
        g.fillOval(0, 0, 2 * r, 2 * r);
    }

    public int getR() {
        return r;
    }
}
